from django.db import models
from .__baseModel import BaseModel

class Category(BaseModel):
    name = models.CharField(max_length=10, null=False)
    img = models.ImageField(upload_to='static/upload/img', db_comment='封面图片')
    show = models.BooleanField(default=False, db_comment='是否显示')
    count = models.IntegerField( default=0, db_comment='内容条数')
    sort = models.IntegerField( default=0, db_comment='排序序号')


    def __str__(self):
        return self.name